package com.kaifamiao.enca;

public class TestTriangle {
    public static void main(String[] args) {
        // 创建三角形实例
        Triangle t = new Triangle(3, 4, 5 );

        // 求三角形周长
        int p = t.perimeter();
        System.out.println( "周长: " + p );

        // 求三角形面积
        double a = t.area();
        System.out.println( "面积: " + a );

        Triangle x = new Triangle(6, 6, 6 );
        System.out.println( x.perimeter() );
        System.out.println( x.area() );
        System.out.println( x.type() );
    }
}
